package scau.redi.social_platform.common.exception;

import scau.redi.social_platform.common.staticCode.ResponseCode;

/**
 * @Author: Redi
 * @Date: 2022/5/18 20:34
 * @Description:
 */
public class AuthException extends RuntimeException {

    private Integer code;

    private String msg;

    /**
     * 自定义异常
     * @param code
     * @param massge
     */
    public AuthException(Integer code, String massge){
        super(massge);
        this.msg=ResponseCode.NEED_LOGIN.getDesc();
        this.code=ResponseCode.NEED_LOGIN.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }


}
